﻿//------------------------------------------------------------------------------------------------- 
// <copyright file="Context.cs" company="Microsoft">
// Microsoft Public License (Ms-PL) - https://smartsetup.codeplex.com/license
// </copyright>
// <author>Steven Shan</author>
//-------------------------------------------------------------------------------------------------

namespace Microsoft.STEVSHAN.SmartSetup.Common
{
    using System;
    using System.Collections.Generic;

    public sealed class Context : Dictionary<string, object>, IContext
    {
        public T GetValue<T>(string key)
        {
            return (T)Convert.ChangeType(this[key], typeof(T));
        }

        public void SetValue<T>(string key, T value)
        {
            this[key] = value;
        }
    }
}